<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('排庭主列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>主持人员(法官)：</label>
                                <input type="text" name="moderators"/>
                            </li>
                            <li>
                                <label>协助人员1(书记员)：</label>
                                <input type="text" name="helpersOne"/>
                            </li>
                            <li>
                                <label>排期地点(法庭)：</label>
                                <input type="text" name="room"/>
                            </li>
                            <li>
                                <label>部门：</label>
                                <input type="text" name="department"/>
                            </li>
                            <li>
                                <label>业务类型:1-排庭：</label>
                                <select name="bizType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li class="select-time">
                                <label>排期开始时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginSchedulingTimeStart]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endSchedulingTimeStart]"/>
                            </li>
                            <li class="select-time">
                                <label>排期结束时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginSchedulingTimeEnd]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endSchedulingTimeEnd]"/>
                            </li>
                            <li>
                                <label>排期时长(单位:分钟)：</label>
                                <input type="text" name="schedulingDuration"/>
                            </li>
                            <li>
                                <label>排期时间-年(2020)：</label>
                                <input type="text" name="year"/>
                            </li>
                            <li>
                                <label>排期时间-月(1)：</label>
                                <input type="text" name="month"/>
                            </li>
                            <li>
                                <label>排期时间-日(1)：</label>
                                <input type="text" name="day"/>
                            </li>
                            <li>
                                <label>排期时间-周几(5)：</label>
                                <input type="text" name="week"/>
                            </li>
                            <li>
                                <label>排期时间-开始时分(00:01)：</label>
                                <input type="text" name="hourMinuteStart"/>
                            </li>
                            <li>
                                <label>排期时间-结束时分(00:01)：</label>
                                <input type="text" name="hourMinuteEnd"/>
                            </li>
                            <li>
                                <label>排期状态：</label>
                                <select name="schedulingStatus">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>排期类型0-案件、1-节假日占用、2-排期地点(法庭)占用 3-主持人员(法官)占用 4-协助人员1(书记员)占用：</label>
                                <select name="schedulingType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>占用类型 0-单次 1-每天 2-每周 3-每月：</label>
                                <select name="occupyType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>是否销期：</label>
                                <input type="text" name="destroyFlag"/>
                            </li>
                            <li>
                                <label>审判长(备注字段)：</label>
                                <input type="text" name="spz"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:schedule:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:schedule:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:schedule:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:schedule:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:schedule:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:schedule:remove')}]];
        var prefix = ctx + "system/schedule";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "排庭主",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'title',
                    title: '标题(排庭人员输入的标题)'
                },
                {
                    field: 'moderators',
                    title: '主持人员(法官)'
                },
                {
                    field: 'helpersOne',
                    title: '协助人员1(书记员)'
                },
                {
                    field: 'room',
                    title: '排期地点(法庭)'
                },
                {
                    field: 'department',
                    title: '部门'
                },
                {
                    field: 'bizType',
                    title: '业务类型:1-排庭'
                },
                {
                    field: 'schedulingTimeStart',
                    title: '排期开始时间'
                },
                {
                    field: 'schedulingTimeEnd',
                    title: '排期结束时间'
                },
                {
                    field: 'schedulingDuration',
                    title: '排期时长(单位:分钟)'
                },
                {
                    field: 'year',
                    title: '排期时间-年(2020)'
                },
                {
                    field: 'month',
                    title: '排期时间-月(1)'
                },
                {
                    field: 'day',
                    title: '排期时间-日(1)'
                },
                {
                    field: 'week',
                    title: '排期时间-周几(5)'
                },
                {
                    field: 'hourMinuteStart',
                    title: '排期时间-开始时分(00:01)'
                },
                {
                    field: 'hourMinuteEnd',
                    title: '排期时间-结束时分(00:01)'
                },
                {
                    field: 'schedulingStatus',
                    title: '排期状态'
                },
                {
                    field: 'schedulingType',
                    title: '排期类型0-案件、1-节假日占用、2-排期地点(法庭)占用 3-主持人员(法官)占用 4-协助人员1(书记员)占用'
                },
                {
                    field: 'occupyType',
                    title: '占用类型 0-单次 1-每天 2-每周 3-每月'
                },
                {
                    field: 'destroyFlag',
                    title: '是否销期'
                },
                {
                    field: 'destroyReason',
                    title: '销期原因'
                },
                {
                    field: 'remark',
                    title: '备注'
                },
                {
                    field: 'spz',
                    title: '审判长(备注字段)'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>